package GUI;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class GUI_page04_ProcessOrders extends JPanel {

	JLabel titleLabel;
	JButton returnButton;
	
	JLabel expectedDeliveryDate;
	JTextField expectedDeliveryDateField;
	JLabel currentDate;
	JTextField currentDateField;
	
	JButton processButton;
	
	public GUI_page04_ProcessOrders() {
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		this.setBackground(Color.white);
		
		// title label
		titleLabel = new JLabel("Process Orders", JLabel.CENTER);
		titleLabel.setVerticalTextPosition(JLabel.CENTER);
		
		titleLabel.setHorizontalTextPosition(JLabel.CENTER);
		titleLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
		titleLabel.setFont(new Font("Century Gothic", Font.BOLD, 20));
		titleLabel.setForeground(Color.gray);
		this.add(titleLabel);
        
		this.add(Box.createRigidArea(new Dimension(0,15)));

        // return button
		returnButton = GUI_AMSStoreMain.makeGrayWhiteButton("Cancel", Component.LEFT_ALIGNMENT);
		this.add(returnButton);
        
        this.add(Box.createRigidArea(new Dimension(0,10)));
        
        // supplier name field
        expectedDeliveryDate = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("Expected Delivery Date", 11);
        this.add(expectedDeliveryDate);
        expectedDeliveryDateField = GUI_AMSStoreMain.makeLeftGrayTextField("yyyy-mm-dd", 200);
		this.add(expectedDeliveryDateField);
		
		this.add(Box.createRigidArea(new Dimension(0,5)));
		
		// address field
		currentDate = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("Current Date", 11);
		this.add(currentDate);
		currentDateField = GUI_AMSStoreMain.makeLeftGrayTextField("yyyy-mm-dd", 200);
		this.add(currentDateField);
		
		this.add(Box.createRigidArea(new Dimension(0,5)));
		
	    // final continue (submit) button
        processButton = GUI_AMSStoreMain.makeGrayWhiteButton("Process", Component.LEFT_ALIGNMENT);
        this.add(processButton);
	}

}
